//package com.flowerSystem.config;
//
//import com.flowerSystem.interceptor.TokenInterceptor;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//import javax.annotation.Resource;
////陈
//
//@Configuration
//public class MvcConfiguration implements WebMvcConfigurer {
//    @Resource
//    private TokenInterceptor tokenInterceptor;
//
//    public MvcConfiguration(TokenInterceptor tokenInterceptor) {
//        this.tokenInterceptor = tokenInterceptor;
//    }
//
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        if (tokenInterceptor != null){
//            registry.addInterceptor(tokenInterceptor).order(1)
////                    .excludePathPatterns("/swagger-resources/**", "/webjars/**", "/v3/**", "/swagger-ui.html/**","/lease/admin/login",
////                            "/lease/user/login","/lease/carmanage","/lease/user/reg","/lease/cartype/**",
////                            "/lease/upload","/lease/download");//要放过的请求
//                    .excludePathPatterns("/**");
//        }
//    }
//
////    @Override
////    public void addResourceHandlers(ResourceHandlerRegistry registry) {
////        registry.addResourceHandler("swagger-ui.html")
////                .addResourceLocations("classpath:/META-INF/resources/");
////        registry.addResourceHandler("/webjars/**")
////                .addResourceLocations("classpath:/META-INF/resources/webjars/");
////    }
//
//
//}
